<?php

namespace App\Exports;

use Maatwebsite\Excel\Concerns\Exportable;
use Maatwebsite\Excel\Concerns\WithMultipleSheets;

class DragonExport implements WithMultipleSheets
{
    use Exportable;

    protected $row1, $data1, $row2, $data2, $row3, $data3;

    public function __construct($row1, $data1, $row2, $data2, $row3, $data3)
    {
        $this->row1  = $row1;
        $this->data1 = $data1;
        $this->row2  = $row2;
        $this->data2 = $data2;
        $this->row3  = $row3;
        $this->data3 = $data3;
    }

    public function sheets(): array
    {
        return [
            new ValidDragonSheet($this->row1, $this->data1),
            new CancelDragonSheet($this->row2, $this->data2),
            new GoodsDragonSheet($this->row3, $this->data3)
        ];
    }
}
